import request from '@/utils/request'

// 查询#出库单列表
export function listOutbound(query) {
  return request({
    url: '/inventory/outbound/list',
    method: 'get',
    params: query
  })
}

// 查询#出库单详细
export function getOutbound(outboundCode) {
  return request({
    url: '/inventory/outbound/' + outboundCode,
    method: 'get'
  })
}

// 新增#出库单
export function addOutbound(data) {
  return request({
    url: '/inventory/outbound',
    method: 'post',
    data: data
  })
}

// 删除#出库单
export function delOutbound(outboundCode) {
  return request({
    url: '/inventory/outbound/' + outboundCode,
    method: 'delete'
  })
}

// 得到仓库列表
export function getWarehouseList() {
  return request({
    url: '/inventory/outbound/getWarehouseList',
    method: 'get'
  })
}

// 更改出库状态
export function updateStatus(data) {
  return request({
    url: '/inventory/outbound/updateStatus',
    method: 'put',
    data: data
  })
}

export function getOrderList(warehouseCode) {
  return request({
    url: '/inventory/outbound/getOrderList/' + warehouseCode,
    method: 'get',
  })
}

export function getGoodsList(orderCode) {
  return request({
    url: '/inventory/outbound/getGoodsList/' + orderCode,
    method: 'get',
  })
}

export function getUserList() {
  return request({
    url: '/inventory/outbound/getUserList',
    method: 'get',
  })
}
